home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 15332 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1015 b 

  1. Path: keats.ugrad.cs.ubc.ca!not-for-mail
  2. From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: debugging a child process with gdb?
  5. Date: 18 Apr 1996 00:01:25 -0700
  6. Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
  7. Message-ID: <4l4pc5INNci6@keats.ugrad.cs.ubc.ca>
  8. References: <4l4htk$dus@news.tamu.edu>
  9. NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
  10.  
  11. In article <4l4htk$dus@news.tamu.edu>, Tom Brown  <tbrown> wrote:
  12. >hi folks,
  13. >
  14. >does anyone know how to set a break point on a
  15. >process that gets exec'ed from a parent process
  16. >with gdb?
  17.  
  18. Haha, you can't do that! The child is an autonomous process with its own trace
  19. flag in the context information. And that flag is likely not turned on.
  20. In any case, gdb can't trace two processes simultaneously, as far as I know.
  21.  
  22. Your best shot is probably to open up a separate terminal emulator window, find
  23. out the PID of the child, and attach a new gdb session to the running child.
  24. Then trace both processes independently.
  25.